<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>成绩输入</title>
    <script>
        let pan=()=> {
            let score = prompt("请输入成绩：");
            //score = isNaN(score)?alert("请输入数字！"):();
            if (isNaN(score)||score<=0) {
                alert("请输入一个正整数")
                //return
            } else {
                if (score > 10) {
                    alert("你被淘汰了！")
                   // return
                } else {
                    alert("进入决赛");
                    let sex = prompt("请输入性别");
                    switch (sex) {
                        case "男": {
                            alert("请进入男子组");
                            break;
                        }
                        case "女": {
                            alert("请进入女子组");
                            break;
                        }
                        default: {
                            alert("请输入合法值")
                        }
                    }
                }
            }
        }


    </script>
</head>
<body>
    <button onclick="pan()">点击输入</button>
</body>
</html>